<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<div th:insert="/common/common"></div>
<body>
    <form class="form-horizontal" role="form" id="userid">
        <input type="hidden" name="pid" th:value="${tperson.pid}">
        <div class="form-group">
            <label for="firstname" class="col-sm-2 control-label">用户名</label>
            <div class="col-sm-10">
                <input type="text" class="form-control" id="firstname" placeholder="请输入用户名" name="pname" th:value="${tperson.pname}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">权限</label>
            <div class="col-sm-10">
                <th:block th:each="role : ${troles}">
                    <label class="checkbox-inline">
                        <input type="checkbox" th:value="${role.roleId}" name="roleId" th:checked="${pids.contains(role.roleId)}"> [[${role.roleName}]]
                    </label>
                </th:block>
            </div>
        </div>
    </form>
</body>
</html>